﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>OAuth认证</title>
<link href="Style/reset.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
    var W_CallBack;
    var iWidth;
    var iHeight;
    var ileft;
    var itop;
    var sResize;
    function sys_fResize(iW, iH) {
        iWidth = iW;
        iHeight = iH;
        ileft = (screen.width - iWidth) / 2 - 5;
        itop = (screen.height - iHeight) / 2 - 20
        sResize = "no";
    }
    function imgBtnClick(url) {
        if (url != '') {
            sys_fResize(800, 600);
            W_CallBack = window.open("about:blank", "W_CallBack", "resizable=" + sResize + ",width=" + iWidth + ",height=" + iHeight + ",left=" + ileft + ",top=" + itop);
            W_CallBack.location.href = url;
        }
    }

    function CallBackSuccess(Type) {
        if (W_CallBack) {
            W_CallBack.close();
        }
        location.href = "Default.aspx?Type=" + Type + "&random=" + Math.random();
    }
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ImageButton runat="server" ID="imgBtnSina" ImageUrl="~/Image/SinaLogin.png" onclick="imgBtnSina_Click" />
        <asp:ImageButton ID="imgBtnWangYi" runat="server" ImageUrl="~/Image/WangYiLogin.jpg" onclick="imgBtnWangYi_Click" />
        <asp:ImageButton ID="imgBtnSohu" runat="server" ImageUrl="~/Image/SohuLogin.png" onclick="imgBtnSohu_Click" />
        <asp:ImageButton ID="ImageBtnQQ" runat="server" ImageUrl="~/Image/qq_login.gif" onclick="imgBtnQQ_Click" />
    </div>
    <div><asp:Label runat="server" ID="labMsg"></asp:Label></div>
    </form>
</body>
</html>
